package com.charon.common.task;

import java.util.TimerTask;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.context.WebApplicationContext;

import com.charon.crawl.kugou.api.KuGouAPI;
import com.charon.crawl.kugou.handler.KGHandler;

/**
 * @ClassName：SongListTask.java
 * @Description: 歌单任务获取
 * @Author charon [248135724@qq.com]
 * @Date:   2018年10月29日 下午7:30:18 
 * @version V1.0 
 */
public class SongListTask extends TimerTask{

	private WebApplicationContext wac = null;
	
	public SongListTask(WebApplicationContext springContext){
		this.wac=springContext;
	}
	
	/**
	 * 开启酷狗定时歌单获取
	 */
	@Override
	public void run(){
		KGHandler.execute(wac);
	}
	
	/*@Scheduled(cron = "0 57 20 * * ?")
	public void start(){
		KuGouAPI.execute(wac);
	}
*/
}
